package foo;

import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;

public class Client {
	public static void main(String[] args) {
		try {
			TTransport transport = new TSocket("localhost", 7777);
			TProtocol protocol = new TBinaryProtocol(transport);
			UserStorage.Client client = new UserStorage.Client(protocol);
			transport.open();
			System.out.println("client call by thrift");
			client.retrieve(111);
			transport.close();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
